<template>
	<view>
		<uni-list>
			<uni-list-item
				v-for="(item, index) in MaintenanceList"
				:title="item.maintenancePlanName"
				:note="item.createTime"
				showArrow
				clickable
				:rightText="item.serviceName"
				@click="ToDetail(item)"
			/>
		</uni-list>
	</view>
</template>

<script>
import { getMaintenanceTaskUser } from '@/api/system/user.js';
export default {
	data() {
		return {
			MaintenanceList: []
		};
	},
	onLoad() {
		this.GetMaintenanceList();
	},
	methods: {
		GetMaintenanceList() {
			getMaintenanceTaskUser().then((res) => {
				this.MaintenanceList = res.rows;
				console.log(res);
			});
		},
		ToDetail(item) {
			uni.navigateTo({
				url: `/pages/work/MaintenancePlan/detail?id=${item.id}`
			});
		}
	}
};
</script>

<style></style>
